package info.hexin.redis;

import info.hexin.redis.model.RedisParams;
import org.springframework.data.redis.core.RedisTemplate;

import java.util.concurrent.TimeUnit;

/**
 * Created by infi.he on 2016/1/28.
 */
public class TestSerializer extends AbstractRedisTest {
    public static void main(String[] args) {
        TestSerializer test1 = new TestSerializer();
        RedisTemplate redisTemplate = test1.getRedisTemplate();


//        RedisParams redisParams = new RedisParams();
//        redisParams.setAccountId("123");
//        redisTemplate.opsForValue().set("infi_1",redisParams);

        //支持属性的增加和删除
        RedisParams redisParams = (RedisParams)redisTemplate.opsForValue().get("infi_1");
        System.out.println(redisParams.getContext());

    }
}
